package com.ham.mud.quests;

import com.ham.mud.ServerConnection;
import com.ham.mud.characters.player.Player;
import com.ham.mud.items.Item;
import com.ham.mud.rooms.Room;
import com.ham.mud.rooms.RoomService;

/**
 * Created by hlucas on Jul 19, 2011 at 12:00:49 PM
 */
public class FindQuest extends Quest {
    Item item;
    Room room;

    public FindQuest(int rewardPoints, int rewardGold) {
        super(rewardPoints, rewardGold);
    }

    @Override
    public void display(ServerConnection connection) {
        connection.println("Find \"" + item.getName() + "\" in \"" + room.getName() + "\" near \"" + RoomService.getZone(room.getZone()).getName() + "\"!");
    }

    @Override
    public boolean isComplete(Player player) {
        return player.getInventory().contains(item);
    }

    public void setRoom(Room room) {
        this.room = room;
    }

    public void setItem(Item item) {
        this.item = item;
    }

    public Item getItem() {
        return item;
    }
}
